#include "GVisitor.h"

#include "GGameObject.h"

namespace GEngine
{
	GVisitor::GVisitor(GUtil::GMask VisitorType, GVisitOrder VisitOrder)
	{
		Type = VisitorType;
		Order = VisitOrder;
	}
	
	GVisitor::~GVisitor()
	{
	}

	GUtil::GMask GVisitor::GetType() const
	{
		return Type;
	}
	
	GVisitOrder GVisitor::GetOrder() const
	{
		return Order;
	}

	bool GVisitor::CanVisit(GGameObject* Node) const
	{
		return Node->GetVisitorMask().Contains(Type);
	}

	void GVisitor::Traverse(GGameObject* StartNode) const
	{
		if (Order == G_VO_ROOT_TO_NODE)
		{

		}
		else if (Order == G_VO_NODE_TO_ROOT)
		{
		}
		else if (Order == G_VO_NODE_TO_LEAF)
		{
		}
		else if (Order == G_VO_LEAF_TO_NODE)
		{
		}
		else // G_VO_SIBLINGS
		{
		}
	}

}; // namespace GScene